<!doctype html>
<html class="signin no-js" lang="">

<head>
    <!-- meta -->
    <meta charset="utf-8">
    <meta name="description" content="Flat, Clean, Responsive, admin template built with bootstrap 3">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
    <!-- /meta -->

    <title>Cameo | Responsive Admin Dashboard</title>

    <!-- page level plugin styles -->
    <link rel="stylesheet" href="__ROOT__/Public/asset/vendor/offline/theme.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/vendor/pace/theme.css">
    <!-- /page level plugin styles -->

    <!-- core styles -->
    <link rel="stylesheet" href="__ROOT__/Public/asset/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/font-awesome.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/animate.min.css">
    <!-- /core styles -->

    <!-- template styles -->
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/skins/palette.1.css" id="skin">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/fonts/style.1.css" id="font">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/main.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/view/reg.css">
    <!-- template styles -->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- load modernizer -->
    <script src="__ROOT__/Public/asset/vendor/modernizr.js"></script>
</head>

<body class="bg-color center-wrapper">





<div class="">
    <div class="row">
        <div class="col-md-12"><div class="cloud"></div></div>
    </div>

    <div class="row">
        <div class="col-xs-10 col-xs-offset-1 col-sm-6 col-sm-offset-3 col-md-5 col-center ">



            <section class="panel panel-default">
                <header class="panel-heading title">立刻加入心秘籍</header>

                <div class="bg-white pd-md">
                    <div class="row">
                        <div class="col-md-8 top-area ">
                            <div class="bg-primary margin-15px" style="border-radius: 3px;height: 50px;"><div style="padding: 15px; ">填写信息即可加入心秘籍<span class="pull-right"><a>组织者用户注册</a></span></div></div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-8 right-border">
                            <form role="form" action="index.html">
                                <input type="text" class="form-control mg-b-sm" placeholder="你的昵称" id="nickname" autofocus required>
                                <input type="text" class="form-control mg-b-sm" placeholder="邮箱地址" id="email" required>
                                <input type="password" class="form-control mg-b-sm" placeholder="密码" id="password" required>
                                <input type="password" class="form-control mg-b-sm" placeholder="确认密码" id="repassword" required>
                                <div class="validation-code">
                                    <input type="text" class="form-control mg-bsm" placeholder="验证码" id="verify" style="width: 40%; display: inline;">
                                    <div style="float:right;"></div><img src="{:U(verify)}" alt="验证码" onClick="this.src=this.src+'?'+Math.random()" />
                                </div>

                                <button class="btn btn-success btn-lg add-margin" type="submit" id="reg-submit">立即注册</button>

                            </form>
                        </div>
                        <div class="col-md-4">
                            <div class="row">
                                <div class="col-md-12">
                                    <p class="text-center">已经有账户了？</p>
                                    <a class="btn btn-success btn-block " href="signin.html">登陆</a>
                                </div>
                                <div class="col-md-12" id="organizer">
                                    <p class="text-center">您是评测组织者？</p>
                                    <a class="btn btn-success btn-block " href="signin.html">评测组织者登陆</a>
                                </div>
                            </div>


                        </div>
                    </div>

                </div>
            </section>
        </div>
    </div>
</div>
</body>

</html>
<script>
    $(document).ready(function(){
       $("#reg-submit").click(function(){
           $.ajax({
              type:"POST",
               url:"__SELF__",
               dataType:"json",
               data:{
                   nickname:$("#nickname").val(),
                   email:$("#email").val(),
                   password:$("#password").val(),
                   repassword:$("#repassword").val(),
                   verify:$("#verify").val()
               },
               success:function(data){
                    if(data.msg == 1){
                        alert("注册成功!");
                    }
                    else{
                        alert(data.msg);
                    }
               },
               error:function(jqXHR){
                   alert("提交错误"+jqXHR.status);
               }
           });
       });
    });
</script>